from socket import *

tcp_client_socket = socket(AF_INET, SOCK_STREAM)

tcp_client_socket.connect(("192.168.0.3", 8080))


for i in range(1, 11):
    with open("img{}.dat".format(i), "rb") as f:
        for i in range(240):
            data = f.read(480)
            tcp_client_socket.send(data)


    print("发送完毕{}".format(i))

tcp_client_socket.close()
